/**
 * Created by changshuiwang on 2016/7/12.
 */
$(function(){
    $("#AddForm").on('beforeSubmit',function(e){
        var $form=$(this);
        $.ajax({
            url: $form.attr('action'),
            type: 'post',
            data: $form.serialize(),
            success: function (data) {
                // do something
                //alert(data);
                console.log(data);
            }
        });
    }).on('submit', function (e) {
            e.preventDefault();
    });
    $("#addform-photo").fileupload({
        dataType: 'json',
        url: $("#AddForm").attr("action"),
        success: function (json) {
            alert("22");
/*            $('#MemType_zmt_pic').attr('value',json.upfile.file);
            $("#images").attr('src',json.upfile.file);*/
        }
    });
})
